home *** CD-ROM | disk | FTP | other *** search
- program Maths;
-
- {$ifdef WINDOWS}
- uses
- WinCrt;
- {$else}
- {$ifndef CONSOLE}
- 'Turn on Project | Options | Linker | Generate console application'
- {$endif}
- {$endif}
-
- type
- TMaths = record
- Val: Byte;
- Sine, Cosine, Tangent: Double;
- end;
-
- procedure SetupFile;
- var
- Maths: TMaths;
- Loop: Byte;
- F: File of TMaths;
- begin
- AssignFile(F, 'C:\DELETEME.DAT');
- try
- Rewrite(F);
- for Loop := 1 to 90 do
- begin
- with Maths do
- begin
- Val := Loop;
- Sine := Sin(Loop);
- Cosine := Cos(Loop);
- Tangent := Sine/Cosine;
- end;
- Write(F, Maths);
- end;
- finally
- CloseFile(F);
- end;
- end;
-
- var
- Buf: Char;
- Num: Integer;
-
- begin
- SetupFile;
- WriteLn;
- Write('Press Enter to exit...');
- ReadLn;
- {$ifndef WIN32}
- DoneWinCrt;
- {$endif}
- end.
-